
import { baseUrlConfig } from '@/config/config';
import request from '@/utils/request'

const bastPath = baseUrlConfig.processBaseUrl
const fastPath = baseUrlConfig.fastUrl
// 新增分类
export const standardClassAppend = (data: any) => {
  return request({
    url: bastPath + '/knowledge/documentStandardClassification/add',
    method: 'post',
    data
  })
}
// 删除分类
export const  standardClassDel= (id: any) => {
  return request({
    url: bastPath + '/knowledge/documentStandardClassification/delete/'+id,
    method: 'delete',
  })
}
// 编辑分类
export const standardClassEdit = (data: any) => {
  return request({
    url: bastPath + '/knowledge/documentStandardClassification/update',
    method: 'post',
    data
  })
}
//获取分类
export const standardClassPage = (catalogueId : string) => {
  return request({
    url: bastPath + '/knowledge/documentStandardClassification/getTree?catalogueId='+catalogueId,
    method: 'get'
  })
}
//获取工作标准(含分页)
export const standardList = (data: any) => {
  return request({
    url: bastPath + '/working/documentWorkingStandard/find/page',
    method: 'post',
    data
  })
}
//获取工作标准(无分页)
export const standardList1 = (data: any) => {
  return request({
    url: bastPath + '/working/documentWorkingStandard/list?standardsId='+data,
    method: 'get',
  })
}
//保存工作标准
export const standardUpdate = (data: any) => {
  return request({
    url: bastPath + '/working/documentWorkingStandard/updateBatch',
    method: 'put',
    data
  })
}
//删除工作标准
export const standardDel= (data: any) => {
  return request({
    url: bastPath + '/working/documentWorkingStandard/deletes',
    method: 'post',
    data
  })
}
//新增工作标准
export const standardAdd= (data: any) => {
  return request({
    url: bastPath + '/working/documentWorkingStandard/adds',
    method: 'post',
    data
  })
}
//上传文件
export const uploadFile=(data:any)=>{
  return request({
    url:bastPath+'/working/documentWorkingStandard/extract',
    method: 'post',
    data
  })
}
//读取附件信息
export const getFileCOntent=(data:any)=>{
  return request({
    url:fastPath + '/fast/getFileContent?enclosureCode='+data,
    method: 'get',
  })
}
